﻿<UserControl x:Class="Foggy.Views.UserView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Border Margin="10" Padding="10" BorderBrush="Black" BorderThickness="2" CornerRadius="2">
        <Grid>
            
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            
            <Grid Grid.Column="0">
                
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                
                <TextBlock Grid.Row="0" x:Name="User_Name" FontWeight="Bold" FontSize="30" />
                
                <Border Grid.Row="1" x:Name="User_IsCurrentlyWorking">
                    <Grid>
                        
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        
                        <!-- Current project -->
                        <TextBlock Grid.Row="0" x:Name="User_CurrentIssue_Project" FontSize="16" VerticalAlignment="Top" TextWrapping="Wrap" Foreground="DarkBlue" FontWeight="Bold" />
                        
                        <!-- Issue Id and Title -->
                        <Grid Grid.Row="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="10" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" x:Name="User_CurrentIssue_Id" FontSize="20" FontWeight="DemiBold" VerticalAlignment="Top" TextWrapping="Wrap" />
                            <TextBlock Grid.Column="2" x:Name="User_CurrentIssue_Title" FontSize="18" VerticalAlignment="Top" TextWrapping="Wrap" />
                        </Grid>
                       
                        <!-- Issue Time Details -->
                        <Grid Grid.Row="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="5" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>

                            <TextBlock Grid.Column="0" x:Name="User_ElapsedTimeDisplayString" FontSize="16" />
                            <TextBlock Grid.Column="1" FontSize="16" Margin="5, 0">/</TextBlock>
                            <TextBlock Grid.Column="2" x:Name="User_CurrentEstimateDisplayString" FontSize="16" />
                            <TextBlock Grid.Column="4" Text="{Binding User.CurrentIssue.PercentageComplete, StringFormat={}({0:F0}%)}" FontSize="16" />
                        </Grid>
                    </Grid>
                </Border>
            </Grid>         
            <Grid Grid.Column="1">
                <ToggleButton x:Name="User_IsAway" Width="200" Height="100">Away</ToggleButton>
            </Grid>
        </Grid>
    </Border>
</UserControl>
